
add_subdirectory(benchmark)

FILE(GLOB COMMON_SRC "common/*.cc")
FILE(GLOB COMMON_HEADER "common/*.h")

FILE(GLOB EVENT_SRC "event/*.cc")
FILE(GLOB EVENT_HEADER "event/*.h")

FILE(GLOB PARSER_SRC "parser/*.cc")
FILE(GLOB PARSER_HEADER "parser/*.h")

FILE(GLOB UTIL_SRC "util/*.cc")
FILE(GLOB UTIL_HEADER "util/*.h")

FILE(GLOB DOUBLE_SRC "common/double-conversion/*.cc")
FILE(GLOB DOUBLE_HEADER "common/double-conversion/*.h")

SET(ALL_SRC
	${COMMON_SRC}
    ${UTIL_SRC}
	${PARSER_SRC}
	${EVENT_SRC}
	#${DIO_SRC}
	#${NET_SRC}
	#${HTTP_SRC}
	${DOUBLE_SRC}
    #${SERVICE_SRC}	
	)


add_library(monoStatic STATIC ${ALL_SRC} )
add_library(monoShared SHARED ${ALL_SRC} )
target_link_libraries(monoStatic  pthread rt)
target_link_libraries(monoShared  pthread rt)
set_target_properties(monoStatic PROPERTIES OUTPUT_NAME 
	mono_static)
set_target_properties(monoShared PROPERTIES OUTPUT_NAME 
	mono)


install(TARGETS monoStatic monoShared 
	RUNTIME DESTINATION bin
	LIBRARY DESTINATION lib 
	ARCHIVE DESTINATION lib
	 )